<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三角形</title>

    <style>
        .a {
            border-style: solid;
            width: 0;
            height: 0;
            /* border: 10px solid pink; */
            border-top: 10px solid pink;
            border-right: 10px solid red;
            border-bottom: 10px solid blue;
            border-left: 10px solid green;
        }
        
        .d {
            width: 0;
            left: 70px;
            height: 0;
            position: absolute;
            bottom: 100px;
            border: 10px solid transparent;
            border-bottom-color: black;
        }
        
        .box {
            top: 100px;
            left: 100px;
            position: relative;
            width: 100px;
            height: 100px;
            border-radius: 10px;
            background-color: black;
        }
    </style>

</head>

<body>


    <div class="a"></div>


    <div class="box">
        <div class="d"></div>
    </div>

</body>

</html>